﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AmiDraw.Editor.Factory
{
    class FileFactory
    {
        public static void InitFile(string path)
        {
            var dir = Path.GetDirectoryName(path);
            InitDir(dir);

            if (File.Exists(path) is false)
            {
                File.Create(path).Close();
            }
        }
        public static void InitDir(string dir)
        {
            if(Directory.Exists(dir) is false)
            {
                Directory.CreateDirectory(dir);
            }
        }
    }
}
